<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @property int $id
 * @property int $pro_id
 * @property int $users_id
 * @property string $createtime 第一次浏览时间
 * @property string $type
 * @property string $updatetime 最后一次浏览时间
 * @property-read \app\model\Activity $activity
 * @property-read \app\model\Forum $forum
 * @property-read \app\model\Friends $friends
 * @property-read \app\model\News $news
 * @property-read \app\model\Question $question
 * @property-read \app\model\QuestionAnswer $answer
 * @property-read \app\model\Recruit $recruit
 * @property-read \app\model\Room $room
 * @property-read \app\model\SecGoods $secgoods
 * @property-read \app\model\StoreAssess $store_assess
 * @property-read \app\model\Talent $talent
 * @property-read mixed $info
 * @mixin \think\Model
 */
class UsersFootmark extends Model
{
	protected $createTime = 'createtime';
	protected $updateTime = 'updatetime';
    function info()
    {
        return $this->morphTo(['type','pro_id'],[
            'answer'=> QuestionAnswer::class,
            'question'=>Question::class
        ]);
    }

    public function question()
    {
        return $this->belongsTo(Question::class ,'pro_id');
    }
    public function news()
    {
        return $this->belongsTo(News::class, 'pro_id');
    }
    public function room()
    {
        return $this->belongsTo(Room::class, 'pro_id');
    }
    public function secgoods()
    {
        return $this->belongsTo(SecGoods::class, 'pro_id');
    }

    public function answer(){
        return $this->belongsTo(QuestionAnswer::class,'pro_id');
    }

    function storeAssess()
    {
        return $this->belongsTo(StoreAssess::class,'pro_id');
    }

    function talent()
    {
        return $this->belongsTo(Talent::class,'pro_id');
    }

    function forum()
    {
        return $this->belongsTo(Forum::class,'pro_id');
    }

    function friends()
    {
        return $this->belongsTo(Friends::class,'pro_id');
    }

    function recruit()
    {
        return $this->belongsTo(Recruit::class,'pro_id');
    }

    function activity()
    {
        return $this->belongsTo(Activity::class,'pro_id');
    }


}
